<?php
 /**
 * Example Application

 * @package Example-application
 */

require 'config.php';

$smarty = new Smarty;
$smarty->assign('title','留言板');



$smarty->force_compile = true;
//$smarty->debugging = true;
$smarty->caching = true;
$smarty->cache_lifetime = 120;
$smarty->display('message.tpl');

if($_POST['email']){

$email = $_POST['email'];
$matter = $_POST['matter'];
$result = mysql_query("insert into message(email,matter,addDate) values('".$email."','".$matter."',now())");
echo $result;
}
?>
